package cn.com.cennavi.service;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;

import org.apache.spark.api.java.function.PairFlatMapFunction;

import cn.com.cennavi.bean.HighPrecisionCombineDirTraffic;
import cn.com.cennavi.bean.HighPrecisionSingleDirTraffic;
import scala.Tuple2;

/**
 * 分岔口道路合并
 * 
 * @ClassName: RoadTrafficCombine
 * @Description: TODO（这里用一句话描述这个类的作用）
 * @author bull
 * @date 2016年4月13日 下午1:08:08
 *
 */
public class RoadTrafficCombine_ground implements PairFlatMapFunction<Tuple2<String, Iterable<HighPrecisionSingleDirTraffic>>, String, HighPrecisionCombineDirTraffic> {
	private static final long serialVersionUID = 1L;

	@Override
	public Iterator<Tuple2<String, HighPrecisionCombineDirTraffic>> call(Tuple2<String, Iterable<HighPrecisionSingleDirTraffic>> arg0) throws Exception {
		// TODO Auto-generated method stub
		ArrayList<Tuple2<String, HighPrecisionCombineDirTraffic>> result = new ArrayList<>();
		String pointId = arg0._1;
		Iterable<HighPrecisionSingleDirTraffic> traffics = arg0._2;
		int num = 0;
		ArrayList<HighPrecisionSingleDirTraffic> trafficDataList = new ArrayList<>();

		for (HighPrecisionSingleDirTraffic traffic : traffics) {
			num++;
			trafficDataList.add(traffic);
			System.out.println("combinereslt1:list:" + traffic.toString());

		}
		// 直行弯路只有一条的情况，需要补全另一条
		if (num == 1) {
			HighPrecisionCombineDirTraffic outLine = getOutLine(trafficDataList.get(0));
			result.add(new Tuple2<String, HighPrecisionCombineDirTraffic>(pointId, outLine));
		} else {
			ArrayList<HighPrecisionCombineDirTraffic> dataList = new ArrayList<>();
			for (HighPrecisionSingleDirTraffic traffic : trafficDataList) {
				HighPrecisionCombineDirTraffic outLine = getOutLine(traffic);
				dataList.add(outLine);
			}
			HighPrecisionCombineDirTraffic outLine = combineTwoLine(dataList);
			result.add(new Tuple2<String, HighPrecisionCombineDirTraffic>(pointId, outLine));
		}
		return result.iterator();
	}

	private HighPrecisionCombineDirTraffic getOutLine(HighPrecisionSingleDirTraffic highPrecisionSingleDirTraffic) {
		// TODO Auto-generated method stub
		String[] arr = highPrecisionSingleDirTraffic.toString().split(",");
		String id = arr[0];
		String lonlat = arr[1];
		String angle = arr[2];
		String dir = arr[3];
		String flag = arr[4];
		String trajMakeTime = "0000";
		String bef_dis_speed = arr[6];
		String aft_dis_speed = arr[7];
		int total_len = Integer.parseInt(arr[8]);
		int bef_len = Integer.parseInt(arr[9]);
		int aft_len = Integer.parseInt(arr[10]);
		String carIdTimeSeq = arr[11];
		String[] bef_dis_speed_other = bef_dis_speed.split("\\|");
		StringBuffer bef_sb = new StringBuffer();
		for (String dis_speed : bef_dis_speed_other) {
			String[] disspeed = dis_speed.split("\\_");
			bef_sb.append(disspeed[0] + "_" + "-1" + "|");
		}
		String[] aft_dis_speed_other = aft_dis_speed.split("\\|");
		StringBuffer aft_sb = new StringBuffer();
		for (String dis_speed : aft_dis_speed_other) {
			String[] disspeed = dis_speed.split("\\_");
			aft_sb.append(disspeed[0] + "_" + "-1" + "|");
		}
		String outLine;
		if (flag.equals("0")) {
			outLine = id + "," + lonlat + "," + angle + "," + dir + "," + bef_dis_speed + "," + aft_dis_speed + "," + bef_sb.toString() + "," + aft_sb.toString() + "," + trajMakeTime + "," + total_len + "," + total_len + "," + bef_len + "," + aft_len
					+ "," + bef_len + "," + aft_len + "," + carIdTimeSeq;

		} else {
			outLine = id + "," + lonlat + "," + angle + "," + dir + "," + bef_sb.toString() + "," + aft_sb.toString() + "," + bef_dis_speed + "," + aft_dis_speed + "," + trajMakeTime + "," + total_len + "," + total_len + "," + bef_len + "," + aft_len
					+ "," + bef_len + "," + aft_len + "," + carIdTimeSeq;
		}
		// 翻转link顺序
		String traffic = getTraffic(outLine);
		System.out.println("traffic:"+traffic);
		return new HighPrecisionCombineDirTraffic().parseLine(traffic);
	}
	private String getTraffic(String outLine) {
		// TODO Auto-generated method stub
		String[] arr = outLine.split(",");
		String[] befStraight = arr[4].split("\\|");
		String[] befbent = arr[6].split("\\|");
		String[] aftStraight = arr[5].split("\\|");
		String[] aftbent = arr[7].split("\\|");
		String carIdTimeSeq = arr[15];
		StringBuffer straight_bef = new StringBuffer();

		for (int i = befStraight.length - 1; i >= 0; i--) {
			straight_bef.append(befStraight[i]);
			straight_bef.append("|");
		}

		StringBuffer straight_aft = new StringBuffer();
		for (int i = aftStraight.length - 1; i >= 0; i--) {
			straight_aft.append(aftStraight[i]);
			straight_aft.append("|");
		}
		StringBuffer bent_bef = new StringBuffer();
		for (int j = befbent.length - 1; j >= 0; j--) {
			bent_bef.append(befbent[j]);
			bent_bef.append("|");
		}
		StringBuffer bent_aft = new StringBuffer();
		for (int j = aftbent.length - 1; j >= 0; j--) {
			bent_aft.append(aftbent[j]);
			bent_aft.append("|");
		}
		String outLine1 = arr[0] + "," + arr[1] + "," + arr[2] + "," + arr[3] + "," + straight_bef.toString() + "," + straight_aft.toString() + "," + bent_bef.toString() + "," + bent_aft.toString() + "," + arr[8] + "," + arr[9] + "," + arr[10] + ","
				+ arr[11] + "," + arr[12] + "," + arr[13] + "," + arr[14] + "," + carIdTimeSeq;
		return outLine1;
	}

	private HighPrecisionCombineDirTraffic combineTwoLine(ArrayList<HighPrecisionCombineDirTraffic> dataList) {
		// TODO Auto-generated method stub
		// 有的时候由于数据会有延迟，导致kafka接收数据变慢，导致一分钟一个路口有2条以上记录，对于同一道路的数据取距离当前时刻最近的数据
		StringBuffer sb = new StringBuffer();
		HashMap<Integer, HighPrecisionCombineDirTraffic> dataMap = new HashMap<Integer, HighPrecisionCombineDirTraffic>();
		for (HighPrecisionCombineDirTraffic data : dataList) {
			sb.append(data.carIdTimeSeq);
			String[] arrs = data.toString().split(",");
			int flag;
			if (arrs[4].contains("-1")) {
				flag = 0;
			} else {
				flag = 1;
			}
			HighPrecisionCombineDirTraffic d = dataMap.get(flag);
			if (d == null) {
				dataMap.put(flag, data);
			} else {
				long time = Long.parseLong(d.timeStamp_5min);
				long nowTime = Long.parseLong(data.timeStamp_5min);
				if (nowTime > time) {
					dataMap.put(flag, data);
				}
			}
		}

		if (dataMap.size() == 1) {
			return dataMap.entrySet().iterator().next().getValue();
		} else {
			String line1 = dataMap.get(0).toString();
			String line2 = dataMap.get(1).toString();
			String[] arr1 = line1.split(",");
			String[] arr2 = line2.split(",");
			if (arr1[4].contains("-1")) {
				arr1[4] = arr2[4];
				arr1[5] = arr2[5];
				arr1[9] = arr2[9];
				arr1[11] = arr2[11];
				arr1[12] = arr2[12];
			} else {
				arr1[6] = arr2[6];
				arr1[7] = arr2[7];
				arr1[10] = arr2[10];
				arr1[13] = arr2[13];
				arr1[14] = arr2[14];
			}
			String out = "";
			for (int i = 0; i < arr1.length; i++) {
				out += arr1[i];
				out += ",";
			}
			out += sb.toString();
			System.out.println("out:"+out);
			return new HighPrecisionCombineDirTraffic().parseLine(out);
		}

	}
	public  static void main(String []args){
		String out="547358,116.28511|39.84293,311.0,11,33_56|18_77|28_69|42_48|118_55|,76_55|69_68|56_60|,11_5|20_24|85_33|40_47|32_38|80_31|,201_31|,0000,438,467,239,199,268,565276623707558:1467282989#|565276623707558:1467282989#|565276623707558:1467282989#|565276623707558:1467282989#|565276623707558:1467282989#|565276623707558:1467282989#|565276623707558:1467282989#|565276623707558:1467282989#|565276623707558:1467282989#|565276623707558:1467282989#|565276623707558:1467282989#|565276623707558:1467282989#|565276623707558:1467282989#|565276623707558:1467282989#|565276623707558:1467282989#|565276623707558:1467282989#|565276623707558:1467282989#|565276623707558:1467282989#|565276623707558:1467282989#|565276623707558:1467282989#|565276623707558:1467282989#|565276623707558:1467282989#|565276623707558:1467282989#|565276623707558:1467282989#|565276623707558:1467282989#|565276623707558:1467282989#|565276623707558:1467282989#|565276623707558:1467282989#|565276623707558:1467282989#|565276623707558:1467282989#|565276623707558:1467282989#|565276623707558:1467282989#|565276623707558:1467282989#|565276623707558:1467282989#|565276623707558:1467282989#|565276623707558:1467282989#|565276623707558:1467282989#|565276623707558:1467282989#|564992150022598:1467282982#565276623707558:1467282989#|565276623707558:1467282989#564992150022598:1467282982#|564992150022598:1467282982#565276623707558:1467282989#|564992150022598:1467282982#565276623707558:1467282989#|564992150022598:1467282982#565276623707558:1467282989#|565276623707558:1467282989#564992150022598:1467282982#|565276623707558:1467282989#564992150022598:1467282982#|564992150022598:1467282982#565276623707558:1467282989#|564992150022598:1467282982#565276623707558:1467282989#|564992150022598:1467282982#565276623707558:1467282989#|564992150022598:1467282982#565276623707558:1467282989#|565276623707558:1467282989#564992150022598:1467282982#|565276623707558:1467282989#564992150022598:1467282982#|564992150022598:1467282982#565276623707558:1467282989#|565276623707558:1467282989#564992150022598:1467282982#|564992150022598:1467282982#565276623707558:1467282989#|565276623707558:1467282989#564992150022598:1467282982#|565276623707558:1467282989#564992150022598:1467282982#|564992150022598:1467282982#565276623707558:1467282989#|564992150022598:1467282982#565276623707558:1467282986#|565276623707558:1467282986#564992150022598:1467282982#|564992150022598:1467282982#565276623707558:1467282986#|565276623707558:1467282986#564992150022598:1467282982#|565276623707558:1467282986#564992150022598:1467282982#|564992150022598:1467282982#565276623707558:1467282986#|564992150022598:1467282982#565276623707558:1467282986#|564992150022598:1467282982#565276623707558:1467282986#|564992150022598:1467282982#565276623707558:1467282986#|564992150022598:1467282982#565276623707558:1467282986#|565276623707558:1467282986#564992150022598:1467282982#|564992150022598:1467282982#565276623707558:1467282986#|565276623707558:1467282986#564992150022598:1467282982#|565276623707558:1467282986#564992150022598:1467282982#|564992150022598:1467282982#565276623707558:1467282986#|565276623707558:1467282986#564992150022598:1467282982#|565276623707558:1467282986#564992150022598:1467282982#|564992150022598:1467282982#565276623707558:1467282986#|564992150022598:1467282982#565276623707558:1467282986#|565276623707558:1467282986#564992150022598:1467282982#|564992150022598:1467282982#565276623707558:1467282986#|564992150022598:1467282982#565276623707558:1467282986#|565276623707558:1467282986#564992150022598:1467282982#|565276623707558:1467282986#564992150022598:1467282982#|564992150022598:1467282982#565276623707558:1467282986#|565276623707558:1467282986#564992150022598:1467282982#|564992150022598:1467282979#565276623707558:1467282986#|565276623707558:1467282986#564992150022598:1467282979#|564992150022598:1467282979#565276623707558:1467282986#|565276623707558:1467282986#564992150022598:1467282979#|565276623707558:1467282986#564992150022598:1467282979#|564992150022598:1467282979#565276623707558:1467282986#|564992150022598:1467282979#565276623707558:1467282986#|564992150022598:1467282979#565276623707558:1467282986#|564992150022598:1467282979#565276623707558:1467282986#|564992150022598:1467282979#565276623707558:1467282986#|564992150022598:1467282979#565276623707558:1467282986#|564992150022598:1467282979#565276623707558:1467282986#|564992150022598:1467282979#565276623707558:1467282986#|564992150022598:1467282979#565276623707558:1467282986#|565276623707558:1467282986#564992150022598:1467282979#|565276623707558:1467282986#564992150022598:1467282979#|565276623707558:1467282986#564992150022598:1467282979#|564992150022598:1467282979#565276623707558:1467282986#|564992150022598:1467282979#565276623707558:1467282986#|564992150022598:1467282979#565276623707558:1467282986#|564992150022598:1467282979#565276623707558:1467282986#|564992150022598:1467282979#565276623707558:1467282986#|564992150022598:1467282979#565276623707558:1467282986#|564992150022598:1467282979#565276623707558:1467282986#|564992150022598:1467282979#565276623707558:1467282986#|564992150022598:1467282979#565276623707558:1467282986#|564992150022598:1467282979#565276623707558:1467282986#|564992150022598:1467282979#565276623707558:1467282986#|564992150022598:1467282979#565276623707558:1467282986#|565276623707558:1467282986#564992150022598:1467282979#|565276623707558:1467282986#564992150022598:1467282979#|565276623707558:1467282986#564992150022598:1467282979#|565276623707558:1467282986#564992150022598:1467282979#|565276623707558:1467282986#564992150022598:1467282979#|565276623707558:1467282986#564992150022598:1467282979#|565276623707558:1467282986#564992150022598:1467282979#|565276623707558:1467282986#564992150022598:1467282979#|565276623707558:1467282986#564992150022598:1467282979#|565276623707558:1467282986#564992150022598:1467282979#|565276623707558:1467282986#564992150022598:1467282979#|565276623707558:1467282986#564992150022598:1467282979#|565276623707558:1467282986#564992150022598:1467282979#|564992150022598:1467282979#565276623707558:1467282986#|564992150022598:1467282979#565276623707558:1467282983#|565276623707558:1467282983#564992150022598:1467282979#|565276623707558:1467282983#564992150022598:1467282979#|564992150022598:1467282976#565276623707558:1467282983#|564992150022598:1467282976#565276623707558:1467282983#|565276623707558:1467282983#564992150022598:1467282976#|565276623707558:1467282983#564992150022598:1467282976#|564992150022598:1467282976#565276623707558:1467282983#|565276623707558:1467282983#564992150022598:1467282976#|564992150022598:1467282976#565276623707558:1467282983#|565276623707558:1467282983#564992150022598:1467282976#|564992150022598:1467282976#565276623707558:1467282983#|564992150022598:1467282976#565276623707558:1467282983#|565276623707558:1467282983#564992150022598:1467282976#|564992150022598:1467282976#565276623707558:1467282983#|565276623707558:1467282983#564992150022598:1467282976#|564992150022598:1467282976#565276623707558:1467282983#|565276623707558:1467282983#564992150022598:1467282976#|565276623707558:1467282983#564992150022598:1467282976#|565276623707558:1467282983#564992150022598:1467282976#|564992150022598:1467282976#565276623707558:1467282983#|564992150022598:1467282976#565276623707558:1467282983#|564992150022598:1467282976#565276623707558:1467282983#|564992150022598:1467282976#565276623707558:1467282983#|564992150022598:1467282976#565276623707558:1467282983#|564992150022598:1467282976#565276623707558:1467282983#|564992150022598:1467282976#565276623707558:1467282983#|564992150022598:1467282976#565276623707558:1467282983#|565276623707558:1467282983#564992150022598:1467282976#|564992150022598:1467282976#565276623707558:1467282983#|565276623707558:1467282983#564992150022598:1467282976#|565276623707558:1467282983#564992150022598:1467282976#|565276623707558:1467282983#564992150022598:1467282976#|564992150022598:1467282976#565276623707558:1467282983#|565276623707558:1467282983#564992150022598:1467282976#|565276623707558:1467282983#564992150022598:1467282976#|564992150022598:1467282976#565276623707558:1467282983#|564992150022598:1467282976#565276623707558:1467282983#|565276623707558:1467282983#564992150022598:1467282976#|564992150022598:1467282976#565276623707558:1467282983#|564992150022598:1467282976#565276623707558:1467282983#|564992150022598:1467282976#565276623707558:1467282983#|565276623707558:1467282983#564992150022598:1467282976#|565276623707558:1467282983#564992150022598:1467282976#|564992150022598:1467282976#565276623707558:1467282983#|564992150022598:1467282976#565276623707558:1467282983#|565276623707558:1467282983#564992150022598:1467282976#|564992150022598:1467282973#565276623707558:1467282983#|565276623707558:1467282983#564992150022598:1467282973#|565276623707558:1467282983#564992150022598:1467282973#|565276623707558:1467282983#564992150022598:1467282973#|564992150022598:1467282973#565276623707558:1467282980#|565276623707558:1467282980#564992150022598:1467282973#|564992150022598:1467282973#565276623707558:1467282980#|564992150022598:1467282973#565276623707558:1467282980#|564992150022598:1467282973#565276623707558:1467282980#|565276623707558:1467282980#564992150022598:1467282973#|565276623707558:1467282980#564992150022598:1467282973#|564992150022598:1467282973#565276623707558:1467282980#|564992150022598:1467282973#565276623707558:1467282980#|564992150022598:1467282973#565276623707558:1467282980#|564992150022598:1467282973#565276623707558:1467282980#|564992150022598:1467282973#565276623707558:1467282980#|565276623707558:1467282980#564992150022598:1467282973#|564992150022598:1467282973#565276623707558:1467282980#|565276623707558:1467282980#564992150022598:1467282973#|564992150022598:1467282973#565276623707558:1467282980#|565276623707558:1467282980#564992150022598:1467282973#|565276623707558:1467282980#564992150022598:1467282973#|564992150022598:1467282973#565276623707558:1467282980#|564992150022598:1467282973#565276623707558:1467282980#|565276623707558:1467282980#564992150022598:1467282973#|565276623707558:1467282980#564992150022598:1467282973#|564992150022598:1467282973#565276623707558:1467282980#|565276623707558:1467282980#564992150022598:1467282973#|565276623707558:1467282980#564992150022598:1467282973#|565276623707558:1467282980#564992150022598:1467282973#|565276623707558:1467282980#564992150022598:1467282973#|565276623707558:1467282980#564992150022598:1467282973#|565276623707558:1467282980#564992150022598:1467282973#|564992150022598:1467282973#565276623707558:1467282980#|564992150022598:1467282973#565276623707558:1467282980#|565276623707558:1467282980#564992150022598:1467282973#|564992150022598:1467282973#565276623707558:1467282980#|564992150022598:1467282973#565276623707558:1467282980#|564992150022598:1467282973#565276623707558:1467282980#|565276623707558:1467282980#564992150022598:1467282973#|565276623707558:1467282980#564992150022598:1467282973#|564992150022598:1467282973#565276623707558:1467282980#|565276623707558:1467282980#564992150022598:1467282973#|564992150022598:1467282973#565276623707558:1467282980#|565276623707558:1467282980#564992150022598:1467282973#|564992150022598:1467282973#565276623707558:1467282980#|565276623707558:1467282980#564992150022598:1467282970#|565276623707558:1467282980#564992150022598:1467282970#|564992150022598:1467282970#565276623707558:1467282980#|565276623707558:1467282980#564992150022598:1467282970#|564992150022598:1467282970#565276623707558:1467282980#|565276623707558:1467282974#564992150022598:1467282970#|565276623707558:1467282974#564992150022598:1467282970#|565276623707558:1467282974#564992150022598:1467282970#|564992150022598:1467282970#565276623707558:1467282974#|564992150022598:1467282970#565276623707558:1467282974#|564992150022598:1467282970#565276623707558:1467282974#|564992150022598:1467282970#565276623707558:1467282974#|564992150022598:1467282970#565276623707558:1467282974#|564992150022598:1467282970#565276623707558:1467282974#|564992150022598:1467282970#565276623707558:1467282974#|564992150022598:1467282970#565276623707558:1467282974#|565276623707558:1467282974#564992150022598:1467282970#|564992150022598:1467282970#565276623707558:1467282974#|565276623707558:1467282974#564992150022598:1467282970#|565276623707558:1467282974#564992150022598:1467282970#|564992150022598:1467282970#565276623707558:1467282974#|564992150022598:1467282970#565276623707558:1467282974#|565276623707558:1467282974#564992150022598:1467282970#|565276623707558:1467282974#564992150022598:1467282970#|564992150022598:1467282970#565276623707558:1467282974#|564992150022598:1467282970#565276623707558:1467282974#|565276623707558:1467282974#564992150022598:1467282970#|564992150022598:1467282970#565276623707558:1467282974#|564992150022598:1467282970#565276623707558:1467282974#|564992150022598:1467282970#565276623707558:1467282974#|564992150022598:1467282970#565276623707558:1467282974#|565276623707558:1467282974#564992150022598:1467282970#|564992150022598:1467282970#565276623707558:1467282974#|564992150022598:1467282970#565276623707558:1467282974#|565276623707558:1467282974#564992150022598:1467282970#|564992150022598:1467282970#565276623707558:1467282974#|565276623707558:1467282974#564992150022598:1467282970#|565276623707558:1467282974#564992150022598:1467282970#|565276623707558:1467282974#564992150022598:1467282970#|564992150022598:1467282970#565276623707558:1467282974#|565276623707558:1467282974#564992150022598:1467282970#|564992150022598:1467282970#565276623707558:1467282974#|564992150022598:1467282970#565276623707558:1467282974#|564992150022598:1467282967#565276623707558:1467282974#|565276623707558:1467282974#564992150022598:1467282967#|565276623707558:1467282974#564992150022598:1467282967#|564992150022598:1467282967#565276623707558:1467282974#|564992150022598:1467282967#565276623707558:1467282974#|564992150022598:1467282967#565276623707558:1467282974#|564992150022598:1467282967#565276623707558:1467282974#|565276623707558:1467282974#564992150022598:1467282967#|565276623707558:1467282974#564992150022598:1467282967#|564992150022598:1467282967#565276623707558:1467282974#|565276623707558:1467282974#564992150022598:1467282967#|564992150022598:1467282967#565276623707558:1467282974#|565276623707558:1467282974#564992150022598:1467282967#|565276623707558:1467282974#564992150022598:1467282967#|564992150022598:1467282967#565276623707558:1467282974#|564992150022598:1467282967#565276623707558:1467282974#|565276623707558:1467282974#564992150022598:1467282967#|564992150022598:1467282967#565276623707558:1467282974#|565276623707558:1467282974#564992150022598:1467282967#|565276623707558:1467282974#564992150022598:1467282967#|564992150022598:1467282967#565276623707558:1467282974#|564992150022598:1467282967#565276623707558:1467282974#|564992150022598:1467282967#565276623707558:1467282974#|564992150022598:1467282967#565276623707558:1467282974#|564992150022598:1467282967#565276623707558:1467282974#|565276623707558:1467282974#564992150022598:1467282967#|564992150022598:1467282967#565276623707558:1467282974#|565276623707558:1467282974#564992150022598:1467282967#|565276623707558:1467282974#564992150022598:1467282967#|564992150022598:1467282967#565276623707558:1467282974#|565276623707558:1467282974#564992150022598:1467282967#|565276623707558:1467282974#564992150022598:1467282967#|564992150022598:1467282967#565276623707558:1467282974#|564992150022598:1467282967#565276623707558:1467282974#|565276623707558:1467282974#564992150022598:1467282967#|564992150022598:1467282967#565276623707558:1467282974#|564992150022598:1467282967#565276623707558:1467282974#|565276623707558:1467282974#564992150022598:1467282967#|565276623707558:1467282974#564992150022598:1467282967#|565276623707558:1467282974#564992150022598:1467282967#|564992150022598:1467282967#565276623707558:1467282974#|565276623707558:1467282974#564992150022598:1467282967#|564992150022598:1467282967#565276623707558:1467282974#|565276623707558:1467282974#564992150022598:1467282964#|565276623707558:1467282974#564992150022598:1467282964#|565276623707558:1467282974#564992150022598:1467282964#|564992150022598:1467282964#565276623707558:1467282974#|564992150022598:1467282964#565276623707558:1467282974#|564992150022598:1467282964#565276623707558:1467282974#|564992150022598:1467282964#565276623707558:1467282974#|564992150022598:1467282964#565276623707558:1467282974#|564992150022598:1467282964#565276623707558:1467282974#|564992150022598:1467282964#565276623707558:1467282974#|564992150022598:1467282964#565276623707558:1467282974#|565276623707558:1467282974#564992150022598:1467282964#|564992150022598:1467282964#565276623707558:1467282974#|565276623707558:1467282974#564992150022598:1467282964#|565276623707558:1467282971#564992150022598:1467282964#|564992150022598:1467282964#565276623707558:1467282971#|564992150022598:1467282964#565276623707558:1467282971#|565276623707558:1467282971#564992150022598:1467282964#|565276623707558:1467282971#564992150022598:1467282964#|564992150022598:1467282964#565276623707558:1467282971#|564992150022598:1467282964#565276623707558:1467282971#|565276623707558:1467282971#564992150022598:1467282964#|564992150022598:1467282964#565276623707558:1467282971#|564992150022598:1467282964#565276623707558:1467282971#|564992150022598:1467282964#565276623707558:1467282971#|564992150022598:1467282964#565276623707558:1467282971#|565276623707558:1467282971#564992150022598:1467282964#|564992150022598:1467282964#565276623707558:1467282971#|564992150022598:1467282964#565276623707558:1467282971#|565276623707558:1467282971#564992150022598:1467282964#|564992150022598:1467282964#565276623707558:1467282971#|565276623707558:1467282971#564992150022598:1467282964#|565276623707558:1467282971#564992150022598:1467282964#|565276623707558:1467282971#564992150022598:1467282964#|564992150022598:1467282964#565276623707558:1467282971#|565276623707558:1467282971#564992150022598:1467282964#|564992150022598:1467282964#565276623707558:1467282971#|564992150022598:1467282964#565276623707558:1467282971#|564992150022598:1467282964#565276623707558:1467282971#|565276623707558:1467282971#564992150022598:1467282964#|565276623707558:1467282971#564992150022598:1467282964#|564992150022598:1467282961#565276623707558:1467282971#|564992150022598:1467282961#565276623707558:1467282971#|564992150022598:1467282961#565276623707558:1467282971#|564992150022598:1467282961#565276623707558:1467282971#|565276623707558:1467282971#564992150022598:1467282961#|565276623707558:1467282971#564992150022598:1467282961#|564992150022598:1467282961#565276623707558:1467282969#|565276623707558:1467282969#564992150022598:1467282961#|564992150022598:1467282961#565276623707558:1467282969#|565276623707558:1467282969#564992150022598:1467282961#|565276623707558:1467282969#564992150022598:1467282961#|564992150022598:1467282961#565276623707558:1467282969#|564992150022598:1467282961#565276623707558:1467282969#|564992150022598:1467282961#565276623707558:1467282969#|564992150022598:1467282961#565276623707558:1467282969#|565276623707558:1467282969#7872379:1467282961#564992150022598:1467282961#|7872379:1467282961#565276623707558:1467282969#564992150022598:1467282961#|564992150022598:1467282961#7872379:1467282961#565276623707558:1467282969#|564992150022598:1467282961#565276623707558:1467282969#7872379:1467282961#|7872379:1467282961#564992150022598:1467282961#565276623707558:1467282969#|564992150022598:1467282961#7872379:1467282961#565276623707558:1467282969#|564992150022598:1467282961#565276623707558:1467282969#7872379:1467282961#|565276623707558:1467282969#564992150022598:1467282961#7872379:1467282961#|565276623707558:1467282969#7872379:1467282961#564992150022598:1467282961#|7872379:1467282961#565276623707558:1467282969#564992150022598:1467282961#|565276623707558:1467282969#7872379:1467282961#564992150022598:1467282961#|7872379:1467282961#564992150022598:1467282961#565276623707558:1467282969#|565276623707558:1467282969#7872379:1467282961#564992150022598:1467282961#|565276623707558:1467282969#564992150022598:1467282961#7872379:1467282961#|564992150022598:1467282961#7872379:1467282961#565276623707558:1467282969#|564992150022598:1467282961#565276623707558:1467282969#7872379:1467282961#|565276623707558:1467282969#564992150022598:1467282961#7872379:1467282961#|7872379:1467282961#564992150022598:1467282961#565276623707558:1467282969#|565276623707558:1467282969#564992150022598:1467282961#7872379:1467282961#|565276623707558:1467282969#7872379:1467282961#564992150022598:1467282961#|565276623707558:1467282969#7872379:1467282961#564992150022598:1467282961#|564992150022598:1467282961#7872379:1467282961#565276623707558:1467282969#|7872379:1467282961#565276623707558:1467282969#564992150022598:1467282961#|564992150022598:1467282961#565276623707558:1467282969#7872379:1467282961#|565276623707558:1467282969#564992150022598:1467282961#7872379:1467282961#|7872379:1467282961#564992150022598:1467282961#565276623707558:1467282969#|7872379:1467282961#565276623707558:1467282969#564992150022598:1467282961#|565276623707558:1467282969#564992150022598:1467282961#7872379:1467282961#|7872379:1467282961#565276623707558:1467282969#|7872379:1467282961#565276623707558:1467282969#|7872379:1467282961#565276623707558:1467282969#|7872379:1467282961#565276623707558:1467282969#|7872379:1467282961#565276623707558:1467282969#|7872379:1467282961#565276623707558:1467282969#|7872379:1467282961#565276623707558:1467282969#|565276623707558:1467282969#7872379:1467282961#|7872379:1467282961#565276623707558:1467282969#|565276623707558:1467282969#7872379:1467282961#|565276623707558:1467282969#7872379:1467282961#|565276623707558:1467282969#7872379:1467282961#|7872379:1467282961#565276623707558:1467282969#|7872379:1467282961#565276623707558:1467282969#|565276623707558:1467282969#7872379:1467282961#|7872379:1467282961#565276623707558:1467282969#|7872379:1467282961#565276623707558:1467282969#|565276623707558:1467282969#7872379:1467282961#|7872379:1467282961#|7872379:1467282961#|7872379:1467282961#|7872379:1467282961#|7872379:1467282961#|7872379:1467282961#|7872379:1467282961#|7872379:1467282961#|7872379:1467282961#|7872379:1467282961#|7872379:1467282961#|7872379:1467282961#|7872379:1467282961#|7872379:1467282961#|7872379:1467282961#|7872379:1467282961#|7872379:1467282961#|7872379:1467282961#|7872379:1467282961#|7872379:1467282961#|7872379:1467282961#|7872379:1467282961#|7872379:1467282961#|7872379:1467282961#|7872379:1467282961#|7872379:1467282961#|7872379:1467282961#|7872379:1467282961#|7872379:1467282961#|7872379:1467282961#|7872379:1467282961#|7872379:1467282961#|7872379:1467282961#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282990#|5075303:1467282987#|5075303:1467282987#|5075303:1467282987#|5075303:1467282987#|5075303:1467282987#|5075303:1467282987#|5075303:1467282987#|5075303:1467282987#|5075303:1467282987#|5075303:1467282987#|5075303:1467282987#|5075303:1467282987#|5075303:1467282987#|5075303:1467282987#|5075303:1467282987#|5075303:1467282987#|5075303:1467282987#|5075303:1467282987#|5075303:1467282987#|5075303:1467282987#|5075303:1467282987#|5075303:1467282987#|5075303:1467282987#|5075303:1467282987#|5075303:1467282987#|5075303:1467282987#|5075303:1467282987#|5075303:1467282987#|5075303:1467282987#|5075303:1467282987#|5075303:1467282987#|5075303:1467282987#|5075303:1467282984#|5075303:1467282984#|5075303:1467282984#|5075303:1467282984#|5075303:1467282984#|5075303:1467282984#|5075303:1467282984#|5075303:1467282984#|5075303:1467282984#|5075303:1467282984#|5075303:1467282984#|5075303:1467282984#|5075303:1467282984#|5075303:1467282984#|5075303:1467282984#|5075303:1467282984#|5075303:1467282984#|5075303:1467282984#|5075303:1467282984#|5075303:1467282984#|5075303:1467282984#|5075303:1467282984#|5075303:1467282984#|5075303:1467282984#|5075303:1467282984#|5075303:1467282984#|5075303:1467282984#|5075303:1467282984#|5075303:1467282984#|5075303:1467282984#|5075303:1467282984#|5075303:1467282984#|5075303:1467282984#|5075303:1467282984#|5075303:1467282984#|5075303:1467282984#|5075303:1467282984#|5075303:1467282984#|5075303:1467282984#|5075303:1467282984#|5075303:1467282978#|5075303:1467282978#|5075303:1467282978#|5075303:1467282978#|5075303:1467282978#|5075303:1467282978#|5075303:1467282978#|5075303:1467282978#|5075303:1467282978#|5075303:1467282978#|5075303:1467282978#|5075303:1467282978#|5075303:1467282978#|5075303:1467282978#|5075303:1467282978#|5075303:1467282978#|5075303:1467282978#|5075303:1467282978#|5075303:1467282978#|5075303:1467282978#|5075303:1467282978#|5075303:1467282978#|5075303:1467282978#|5075303:1467282978#|5075303:1467282978#|5075303:1467282978#|5075303:1467282978#|5075303:1467282978#|5075303:1467282978#|5075303:1467282978#|5075303:1467282978#|5075303:1467282978#|5075303:1467282978#|5075303:1467282978#|5075303:1467282978#|5075303:1467282978#|5075303:1467282978#|5075303:1467282978#|5075303:1467282978#|5075303:1467282978#|5075303:1467282978#|5075303:1467282978#|5075303:1467282978#|5075303:1467282978#|5075303:1467282978#|5075303:1467282978#|5075303:1467282978#|5075303:1467282978#|5075303:1467282978#|5075303:1467282978#|5075303:1467282978#|5075303:1467282978#|5075303:1467282978#|5075303:1467282978#|5075303:1467282978#|5075303:1467282978#|5075303:1467282975#|5075303:1467282975#|5075303:1467282975#|5075303:1467282975#|5075303:1467282975#|5075303:1467282975#|5075303:1467282975#|5075303:1467282975#|5075303:1467282975#|5075303:1467282975#|5075303:1467282975#|5075303:1467282975#|5075303:1467282975#|5075303:1467282975#|5075303:1467282975#|5075303:1467282975#|5075303:1467282975#|5075303:1467282975#|5075303:1467282975#|5075303:1467282975#|5075303:1467282975#|5075303:1467282975#|5075303:1467282975#|5075303:1467282975#|5075303:1467282975#|5075303:1467282975#|5075303:1467282975#|5075303:1467282975#|5075303:1467282975#|5075303:1467282972#|5075303:1467282972#|5075303:1467282972#|5075303:1467282972#|5075303:1467282972#|5075303:1467282972#|5075303:1467282972#|5075303:1467282972#|5075303:1467282972#|5075303:1467282972#|5075303:1467282972#|5075303:1467282972#|5075303:1467282972#|5075303:1467282972#|5075303:1467282972#|5075303:1467282972#|5075303:1467282972#|5075303:1467282972#|5075303:1467282972#|5075303:1467282972#|5075303:1467282965#|5075303:1467282965#|5075303:1467282965#|5075303:1467282965#|5075303:1467282965#|5075303:1467282965#|5075303:1467282965#|5075303:1467282965#|5075303:1467282965#|5075303:1467282965#|5075303:1467282965#|";
		HighPrecisionCombineDirTraffic sss=new HighPrecisionCombineDirTraffic().parseLine(out);
	}
}
